package com.gem.day03.exercise;

/**
 * 	一张0.001米厚的纸折叠几次可以比喜马拉雅山高(8848米)
 */
public class Exercise1 {
	public static void main(String[] args) {
		//定义变量保存纸的厚度
		double paperHeight = 0.001;
		//定义变量保存对折次数
		int count = 0;
		//循环
		for (;;) {
			//次数+1
			count++;
			//对折高度*2
			paperHeight *= 2;
			//判断
			if (paperHeight > 8848) {
				break;
			}
		}
		System.out.println("次数: " + count);
	}
}
